package cn.lvxs.freeeast.base_System;

import java.util.Iterator;
import java.util.Map;

import com.wabacus.config.component.application.report.ReportBean;
import com.wabacus.system.ReportRequest;
import com.wabacus.system.intercept.AbsInterceptorDefaultAdapter;
import com.wabacus.util.DesEncryptTools;

public class Interceptor_EncryptPwd extends AbsInterceptorDefaultAdapter
{
    public int beforeSavePerRow(ReportRequest rrequest,ReportBean rbean,Map mRowData,Map mExternalValues,int updatetype)
    {
        if(mRowData!=null)//mRowData中存放了本条记录各列的值
        {
        	String originalPassword=(String) mRowData.get("[NOISSIMREP_YALPSIDNON]Password");
        	mRowData.put("[NOISSIMREP_YALPSIDNON]Password",DesEncryptTools.encrypt(originalPassword));
        }
        return WX_CONTINUE;
    }

    public int afterSavePerRow(ReportRequest rrequest,ReportBean rbean,Map mRowData,Map mExternalValues,int updatetype)
    {
        return WX_CONTINUE;
    }

}
